
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>第 3 章 Yarn ResourceMange HA · 大数据 HA 课堂笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content=" 李振超">
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-page-toc-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism-base16-ateliersulphurpool.light.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-change_girls/girls.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="styles/website.css">
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    
    <link rel="prev" href="chapter1/26-wen-da.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://www.atguigu.com/" target="_blank" class="custom-link">联系我们</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    第 1 章 HA概述
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="chapter1.html">
            
                <a href="chapter1.html">
            
                    
                    第 2 章 HDFS HA
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="chapter1/21-bei-jing.html">
            
                <a href="chapter1/21-bei-jing.html">
            
                    
                    2.1 背景
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="chapter1/22-jia-gou.html">
            
                <a href="chapter1/22-jia-gou.html">
            
                    
                    2.2 架构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="chapter1/23-bu-shu.html">
            
                <a href="chapter1/23-bu-shu.html">
            
                    
                    2.3 HDFS HA 部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="chapter1/24-ha-hdfs-ji-qun-guan-li-ming-ling.html">
            
                <a href="chapter1/24-ha-hdfs-ji-qun-guan-li-ming-ling.html">
            
                    
                    2.4 HA HDFS 集群管理命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="chapter1/24-zi-dong-bei-707e28-automatic-failover.html">
            
                <a href="chapter1/24-zi-dong-bei-707e28-automatic-failover.html">
            
                    
                    2.5 自动备灾(Automatic Failover)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="chapter1/26-wen-da.html">
            
                <a href="chapter1/26-wen-da.html">
            
                    
                    2.6 自动备灾常见问题
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter active" data-level="1.3" data-path="di-3-zhang-yarn-resourcemange-ha.html">
            
                <a href="di-3-zhang-yarn-resourcemange-ha.html">
            
                    
                    第 3 章 Yarn ResourceMange HA
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >第 3 章 Yarn ResourceMange HA</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x7B2C;-3-&#x7AE0;-yarn-resourcemanger-ha">&#x7B2C; 3 &#x7AE0; Yarn ResourceManger HA</h1>
<h2 id="31-&#x4ECB;&#x7ECD;">3.1 &#x4ECB;&#x7ECD;</h2>
<p>Yarn ResourceManger(RM)&#x8D1F;&#x8D23;&#x8FFD;&#x8E2A;&#x96C6;&#x7FA4;&#x4E2D;&#x7684;&#x8D44;&#x6E90;, &#x5E76;&#x4E14;&#x8C03;&#x5EA6;&#x5E94;&#x7528;(&#x6BD4;&#x5982;: MapReduce jobs).</p>
<p>&#x5728; Hadoop 2.4 &#x4E4B;&#x524D;, Yarn ResourceManager &#x4E5F;&#x662F;&#x5B58;&#x5728;&#x5355;&#x70B9;&#x5931;&#x6548;&#x7684;(single point of faiilure).</p>
<p>RM &#x7684; HA &#x7279;&#x6027;&#x6DFB;&#x52A0;&#x4E86;&#x5197;&#x4F59;, &#x4EE5; Active RM &#x548C; Standby RM &#x7684;&#x5F62;&#x5F0F;&#x5728;&#x5DE5;&#x4F5C;.</p>
<hr>
<h2 id="32-&#x67B6;&#x6784;">3.2 &#x67B6;&#x6784;</h2>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1539927854.png-atguiguText" alt=""></p>
<p>&#x7531;&#x4E8E; RM &#x57FA;&#x672C;&#x4E0D;&#x6D89;&#x53CA;&#x5230;&#x6570;&#x636E;&#x7684;&#x5B58;&#x50A8;, &#x6240;&#x4EE5;&#x5B83;&#x7684; HA &#x5B9E;&#x73B0;&#x76F8;&#x5BF9;&#x4E8E; HDFS HA &#x8981;&#x7B80;&#x5355;&#x7684;&#x591A;.</p>
<hr>
<h2 id="33-rm-failover">3.3 RM Failover</h2>
<p>ResourceManger HA &#x4F9D;&#x8D56; Active/Standby &#x67B6;&#x6784;, &#x5728;&#x4EFB;&#x4F55;&#x65F6;&#x95F4;, &#x53EA;&#x6709;&#x4E00;&#x4E2A; RM &#x662F; Active, &#x5176;&#x4ED6;&#x7684; RM &#x90FD;&#x662F; Standby. </p>
<p>&#x548C; HDFS HA &#x7C7B;&#x4F3C;, RM HA &#x5373;&#x53EF;&#x4EE5;&#x624B;&#x52A8;&#x5907;&#x707E;, &#x4E5F;&#x53EF;&#x4EE5;&#x81EA;&#x52A8;&#x5907;&#x707E;.</p>
<h3 id="331-&#x624B;&#x52A8;&#x5907;&#x707E;">3.3.1 &#x624B;&#x52A8;&#x5907;&#x707E;</h3>
<p>&#x5982;&#x679C;&#x6CA1;&#x6709;&#x542F;&#x52A8;&#x81EA;&#x52A8;&#x5907;&#x707E;, &#x7BA1;&#x7406;&#x5458;&#x5FC5;&#x987B;&#x624B;&#x52A8;&#x628A;&#x4E00;&#x4E2A; Standby RM &#x53D8;&#x6210; Active RM. </p>
<p>&#x5982;&#x679C;&#x60F3;&#x8981;&#x624B;&#x52A8;&#x5907;&#x707E;, &#x5FC5;&#x987B;&#x5148;&#x628A; Active RM &#x53D8;&#x6210; Standby RM, &#x7136;&#x540E;&#x518D;&#x628A;&#x5176;&#x4ED6;&#x7684; Standby RM &#x53D8;&#x6210; Active RM.</p>
<p>&#x6240;&#x6709;&#x8FD9;&#x4E9B;&#x64CD;&#x4F5C;&#x90FD;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; <code>yarn rmadmin</code> CLI</p>
<h3 id="332-&#x81EA;&#x52A8;&#x5907;&#x707E;">3.3.2 &#x81EA;&#x52A8;&#x5907;&#x707E;</h3>
<p>RMs &#x6709;&#x9009;&#x9879;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x57FA;&#x4E8E; Zookeeper &#x7684; ActiveStandbyElector &#x6765;&#x51B3;&#x5B9A;&#x54EA;&#x4E2A; RM &#x5E94;&#x8BE5;&#x662F;&#x6D3B;&#x52A8;&#x7684;.</p>
<p>&#x5F53;&#x6D3B;&#x52A8;&#x7684; RM &#x6302;&#x4E86;, &#x6216;&#x8005;&#x6CA1;&#x6709;&#x54CD;&#x5E94;&#x4E86;, &#x53E6;&#x5916;&#x4E00;&#x4E2A; RM &#x5C31;&#x4F1A;&#x81EA;&#x52A8;&#x88AB;&#x9009;&#x4E3E;&#x6210; Active RM.</p>
<p>&#x6709;&#x4E00;&#x5B9A;&#x9700;&#x8981;&#x6CE8;&#x610F;&#x7684;&#x662F;, &#x6CA1;&#x6709;&#x5FC5;&#x987B;&#x53BB;&#x60F3; HDFS HA &#x90A3;&#x6837;&#x53BB;&#x8FD0;&#x884C;&#x4E00;&#x4E2A;&#x5355;&#x72EC;&#x7684; ZKFC, &#x56E0;&#x4E3A; ActiveStandbyElector &#x5DF2;&#x7ECF;&#x505A;&#x5230;&#x4E86;&#x5931;&#x8D25;&#x68C0;&#x6D4B;&#x548C;&#x9886;&#x5BFC;&#x9009;&#x4E3E;&#x6765;&#x66FF;&#x6362; ZKFC</p>
<h3 id="333-&#x5BA2;&#x6237;&#x7AEF;-applicationmaster-&#x548C;-nodemanger">3.3.3 &#x5BA2;&#x6237;&#x7AEF;, ApplicationMaster &#x548C; NodeManger</h3>
<p>&#x5F53;&#x6709;&#x591A;&#x4E2A; ResourceManager &#x7684;&#x65F6;&#x5019;, &#x5BA2;&#x6237;&#x7AEF;&#x548C;&#x8282;&#x70B9;&#x8981;&#x6C42;&#x914D;&#x7F6E;&#x6587;&#x4EF6;(yarn-site.xml) &#x5217;&#x51FA;&#x6240;&#x6709;&#x7684; ResourceManager .</p>
<p>&#x5BA2;&#x6237;&#x7AEF;, ApplicationMasters(AMs)&#x548C; NodeManagers(NMs) &#x4F1A;&#x8BD5;&#x56FE;&#x4EE5;&#x5FAA;&#x73AF;&#x7684;&#x65B9;&#x5F0F;&#x8FDE;&#x63A5; ResourceManagers, &#x77E5;&#x9053;&#x4ED6;&#x4EEC;&#x8FDE;&#x4E0A; Active RM.</p>
<p>&#x5982;&#x679C; Active RM &#x6302;&#x4E86;, &#x4ED6;&#x4EEC;&#x5C31;&#x4E00;&#x76F4;&#x5FAA;&#x73AF;&#x7684;&#x53BB;&#x8FDE;, &#x76F4;&#x5230;&#x4EA7;&#x751F;&#x65B0;&#x7684; Active RM.</p>
<p>&#x9ED8;&#x8BA4;&#x7684;&#x91CD;&#x8BD5;&#x7684;&#x903B;&#x8F91;&#x662F;&#x7531;&#x8FD9;&#x4E2A;&#x7C7B;&#x63D0;&#x4F9B;&#x7684;:<code>org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvide</code></p>
<h2 id="34-rm-ha-&#x90E8;&#x7F72;">3.4 RM HA &#x90E8;&#x7F72;</h2>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1539930910.png-atguiguText" alt=""></p>
<h3 id="341-&#x914D;&#x7F6E;-yarn-sitexml">3.4.1 &#x914D;&#x7F6E; <code>yarn-site.xml</code></h3>
<p>&#x6240;&#x6709;&#x7684;&#x5173;&#x4E8E; Yarn ResourceManger &#x7684;&#x914D;&#x7F6E;&#x90FD;&#x5728;&#x8FD9;&#x4E2A;&#x6587;&#x4EF6;&#x4E2D;.</p>
<p>&#x4E0B;&#x9762;&#x662F; RM HA &#x7684;&#x6700;&#x5C0F;&#x914D;&#x7F6E;.</p>
<pre class="language-"><code class="lang-xml"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>name</span><span class="token punctuation">&gt;</span></span>yarn.nodemanager.aux-services<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>name</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>value</span><span class="token punctuation">&gt;</span></span>mapreduce_shuffle<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>value</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>

<span class="token comment">&lt;!--&#x542F;&#x7528;resourcemanager ha--&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>name</span><span class="token punctuation">&gt;</span></span>yarn.resourcemanager.ha.enabled<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>name</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>value</span><span class="token punctuation">&gt;</span></span>true<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>value</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>

<span class="token comment">&lt;!--&#x6307;&#x5B9A;&#x4E00;&#x4E2A;&#x96C6;&#x7FA4;. &#x7531;&#x9009;&#x6C11;&#x4F7F;&#x7528;, &#x786E;&#x4FDD; RM &#x4E0D;&#x4F1A;&#x63A5;&#x7BA1;&#x5176;&#x4ED6;&#x96C6;&#x7FA4;&#x7684;&#x6D3B;&#x52A8;--&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>name</span><span class="token punctuation">&gt;</span></span>yarn.resourcemanager.cluster-id<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>name</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>value</span><span class="token punctuation">&gt;</span></span>cluster-yarn1<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>value</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>

<span class="token comment">&lt;!-- &#x5217;&#x4E3E;&#x591A;&#x4E2A; RM &#x7684;&#x903B;&#x8F91; ID --&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>name</span><span class="token punctuation">&gt;</span></span>yarn.resourcemanager.ha.rm-ids<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>name</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>value</span><span class="token punctuation">&gt;</span></span>rm1,rm2<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>value</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>

<span class="token comment">&lt;!-- RM1 &#x7684;&#x4E3B;&#x673A;&#x5730;&#x5740; --&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>name</span><span class="token punctuation">&gt;</span></span>yarn.resourcemanager.hostname.rm1<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>name</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>value</span><span class="token punctuation">&gt;</span></span>hadoop201<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>value</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>

<span class="token comment">&lt;!-- RM2 &#x7684;&#x4E3B;&#x673A;&#x5730;&#x5740; --&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>name</span><span class="token punctuation">&gt;</span></span>yarn.resourcemanager.hostname.rm2<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>name</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>value</span><span class="token punctuation">&gt;</span></span>hadoop202<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>value</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>

<span class="token comment">&lt;!--&#x6307;&#x5B9A;zookeeper&#x96C6;&#x7FA4;&#x7684;&#x5730;&#x5740;--&gt;</span> 
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>name</span><span class="token punctuation">&gt;</span></span>yarn.resourcemanager.zk-address<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>name</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>value</span><span class="token punctuation">&gt;</span></span>hadoop201:2181,hadoop202:2181,hadoop203:2181<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>value</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>

<span class="token comment">&lt;!--&#x542F;&#x7528;&#x81EA;&#x52A8;&#x5907;&#x707E;&#x529F;&#x80FD;--&gt;</span> 
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>name</span><span class="token punctuation">&gt;</span></span>yarn.resourcemanager.recovery.enabled<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>name</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>value</span><span class="token punctuation">&gt;</span></span>true<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>value</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>

<span class="token comment">&lt;!--&#x6307;&#x5B9A;resourcemanager&#x7684;&#x72B6;&#x6001;&#x4FE1;&#x606F;&#x5B58;&#x50A8;&#x5728;zookeeper&#x96C6;&#x7FA4;--&gt;</span> 
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>name</span><span class="token punctuation">&gt;</span></span>yarn.resourcemanager.store.class<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>name</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>value</span><span class="token punctuation">&gt;</span></span>org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>value</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>property</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<hr>
<h3 id="342-&#x542F;&#x52A8;">3.4.2 &#x542F;&#x52A8;</h3>
<h4 id="&#x6B65;&#x9AA4;1-&#x5206;&#x53D1;&#x914D;&#x7F6E;&#x6587;&#x4EF6;yarn-sitexml&#x5230;&#x5176;&#x4ED6;&#x8282;&#x70B9;">&#x6B65;&#x9AA4;1: &#x5206;&#x53D1;&#x914D;&#x7F6E;&#x6587;&#x4EF6;<code>yarn-site.xml</code>&#x5230;&#x5176;&#x4ED6;&#x8282;&#x70B9;</h4>
<h4 id="&#x6B65;&#x9AA4;2-&#x5728;-hadoop201&#x542F;&#x52A8;-yarn">&#x6B65;&#x9AA4;2: &#x5728; hadoop201&#x542F;&#x52A8; yarn</h4>
<pre class="language-"><code>sbin/start-yarn.sh
</code></pre><p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1539934444.png-atguiguText" alt=""></p>
<h4 id="&#x6B65;&#x9AA4;3-&#x5728;-hadoop202&#x5355;&#x72EC;&#x542F;&#x52A8;-resourcemanager">&#x6B65;&#x9AA4;3: &#x5728; hadoop202&#x5355;&#x72EC;&#x542F;&#x52A8; ResourceManager</h4>
<pre class="language-"><code class="lang-bash">sbin/yarn-daemon.sh start resourcemanager
</code></pre>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1539934878.png-atguiguText" alt=""></p>
<h4 id="&#x6B65;&#x9AA4;4-&#x67E5;&#x770B;-resourcemanger&#x72B6;&#x6001;">&#x6B65;&#x9AA4;4: &#x67E5;&#x770B; ResourceManger&#x72B6;&#x6001;</h4>
<pre class="language-"><code class="lang-bash">bin/yarn rmadmin -getServiceState rm1
</code></pre>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1539935054.png-atguiguText" alt=""></p>
<h4 id="&#x6B65;&#x9AA4;5-&#x81EA;&#x52A8;&#x5907;&#x707E;">&#x6B65;&#x9AA4;5: &#x81EA;&#x52A8;&#x5907;&#x707E;</h4>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1539935375.png-atguiguText" alt=""></p>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; &#x5C1A;&#x7845;&#x8C37;&#x5927;&#x6570;&#x636E; &amp; 2019 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification"><br>&#x8BE5;&#x6587;&#x4EF6;&#x6700;&#x540E;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2018-10-19 15:49:42
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="chapter1/26-wen-da.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: 2.6 自动备灾常见问题">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"第 3 章 Yarn ResourceMange HA","level":"1.3","depth":1,"previous":{"title":"2.6 自动备灾常见问题","level":"1.2.6","depth":2,"path":"chapter1/26-wen-da.md","ref":"chapter1/26-wen-da.md","articles":[]},"dir":"ltr"},"config":{"plugins":["splitter","expandable-chapters-small","page-toc-button","-highlight","prism","prism-themes","tbfed-pagefooter","sitemap","change_girls","livereload"],"styles":{"website":"styles/website.css","ebook":"styles/ebook.css","pdf":"styles/pdf.css","mobi":"styles/mobi.css","epub":"styles/epub.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy 尚硅谷大数据 & 2019","modify_label":"<br>该文件最后修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"prism":{"css":["prism-themes/themes/prism-base16-ateliersulphurpool.light.css"]},"disqus":{"shortName":"zhenchao125"},"livereload":{},"splitter":{},"change_girls":{"time":30,"urls":["http://o7cqr8cfk.bkt.clouddn.com/18-3-4/62171757.jpg-atguiguImg","http://o7cqr8cfk.bkt.clouddn.com/18-3-4/83394736.jpg-atguiguImg","http://o7cqr8cfk.bkt.clouddn.com/18-3-4/15906185.jpg-atguiguImg","http://o7cqr8cfk.bkt.clouddn.com/18-3-4/15906185.jpg-atguiguImg","http://o7cqr8cfk.bkt.clouddn.com/18-3-4/3394270.jpg-atguiguImg","http://o7cqr8cfk.bkt.clouddn.com/18-3-4/65028582.jpg-atguiguImg","http://o7cqr8cfk.bkt.clouddn.com/18-3-4/20359261.jpg-atguiguImg","http://o7cqr8cfk.bkt.clouddn.com/18-3-4/37472401.jpg-atguiguImg","http://o7cqr8cfk.bkt.clouddn.com/18-3-4/3355397.jpg-atguiguImg","http://o7cqr8cfk.bkt.clouddn.com/18-3-4/11075549.jpg-atguiguImg"]},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sitemap":{"hostname":"https://www.gitbook.com/@zhenchao125"},"page-toc-button":{"maxTocDepth":6,"minTocSize":5},"prism-themes":{},"expandable-chapters-small":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":" 李振超","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"大数据 HA 课堂笔记","language":"zh-hans","links":{"sidebar":{"联系我们":"http://www.atguigu.com/"}},"gitbook":"*","description":"课堂笔记,学生提前预习"},"file":{"path":"di-3-zhang-yarn-resourcemange-ha.md","mtime":"2018-10-19T07:49:42.161Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-11T09:39:05.323Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-page-toc-button/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-change_girls/girls.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

